<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="icon" href="img/favicon.ico" />
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="codemirror/lib/codemirror.css"/>
		<link rel="stylesheet" type="text/css" href="codemirror/addon/fold/foldgutter.css"/>
		<link rel="stylesheet" type="text/css" href="codemirror/theme/eclipse.css"/>
		<title>JerryRat服务器</title>
		<script src="js/system/ajax.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/system/system.js" type="text/javascript" charset="utf-8"></script>
		<script src="codemirror/lib/codemirror.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<canvas id="BGCanvas" width="" height=""></canvas>
		<div id="main">
			<div id="head">
				<canvas id="JerryRatCanvas" width="960" height="150"
					onmousedown="downJerryRatCanvas(event)" onmouseup="upJerryRatCanvas(event)"
					onmouseleave="upJerryRatCanvas(event)" onmousemove="moveJerryRatCanvas(event)"></canvas>
				<script src="js/jerryrat/febonescartoon.js" type="text/javascript" charset="utf-8"></script>
				<script src="js/jerryrat/jerryrat.js" type="text/javascript"></script>
				<h1>杰瑞鼠服务器管理系统</h1>
			</div>
			<div id="body">
				<div id="select-panel">
					<div class="select-nav">
						<button type="button" onclick="intoHome()">
							<img src="img/home.png">
							<div>首页</div>
						</button>
						<button type="button" onclick="intoServer()">
							<img src="img/server.png">
							<div>服务器</div>
						</button>
						<button type="button" onclick="intoProject()">
							<img src="img/project.png">
							<div>项目</div>
						</button>
						<button type="button" onclick="intoFileSystem()">
							<img src="img/file_system.png">
							<div>文件</div>
						</button>
						<button type="button" onclick="intoConsole()">
							<img src="img/console.png">
							<div>控制台</div>
						</button>
						<button type="button" onclick="intoHelp()">
							<img src="img/help.png">
							<div>帮助</div>
						</button>
					</div>
					<div class="select-content">
						<div class="Home content">
							<div class="wellcom">
								<h1 class="title">
									轻量级WEB服务器
								</h1>
								<div class="point">
									<h4>使用简单</h4>
									<p>双击运行，即使不会编程也能轻松部署一个静态网站。</p>
								</div>
								<div class="point">
									<h4>体积小巧</h4>
									<p>全软件程序与资源压缩后不到1MB，包含所有核心功能。</p>
								</div>
								<div class="point">
									<h4>运行高效</h4>
									<p>采用线程池与字节集解析技术，5毫秒之间便可完成响应。</p>
								</div>
								<div class="point">
									<h4>易于扩展</h4>
									<p>用配置文件注入项目依赖，随时随地进行更改。</p>
								</div>
							</div>
							<script src="js/home/home.js" type="text/javascript" charset="utf-8"></script>
						</div>
						<div class="Server content">
							<div id="ServerConfiguration">
								<canvas id="webBack" width="200" height="200"></canvas>
								<img src="img/web.png" id="web">
								<canvas id="webFont" width="200" height="200"></canvas>
								<script src="js/server/serverhost.js" type="text/javascript" charset="utf-8"></script>
								<div id="context">
									<div id="inside">
										<span>资源符编码</span>
										<input type="text" id="urlCharset" value="" />
										<select name="urlCharset" id="urlCharsetSelect"
											onchange="selected('urlCharset',this)">
											<option value="" selected="selected">源</option>
											<option value="default">默认</option>
											<option value="GBK">GBK</option>
											<option value="UTF-8">UTF-8</option>
										</select>
										<br>
										<span>本地编码</span>
										<input type="text" id="charset" value="" />
										<select name="charset" id="charsetSelect" onchange="selected('charset',this)">
											<option value="" selected="selected">源</option>
											<option value="default">默认</option>
											<option value="GBK">GBK</option>
											<option value="UTF-8">UTF-8</option>
										</select>
										<br>
										<span>接收超时时间</span>
										<input type="text" id="receiveTimeOut" value="" />
										<select name="receiveTimeOut" id="receiveTimeOutSelect"
											onchange="selected('receiveTimeOut',this)">
											<option value="" selected="selected">源</option>
											<option value="24000">默认</option>
											<option value="1000">一秒</option>
											<option value="60000">一分钟</option>
										</select>
										<br>
										<span>端口号</span>
										<input type="text" id="port" value="" />
										<select name="port" id="portSelect" onchange="selected('port',this)">
											<option value="" selected="selected">源</option>
											<option value="80">默认</option>
											<option value="8080">Tomcat</option>
											<option value="8848">HbuilderX</option>
										</select>
										<br>
										<span>类路径</span>
										<input type="text" id="classPath" value="" />
										<select name="classPath" id="classPathSelect"
											onchange="selected('classPath',this)">
											<option value="" selected="selected">源</option>
											<option value="bin">默认</option>
											<option value="src">src</option>
											<option value="lib">lib</option>
										</select>
										<br>
										<span>日志开关</span>
										<input type="text" id="logSwitch" value="" />
										<select name="logSwitch" id="logSwitchSelect"
											onchange="selected('logSwitch',this)">
											<option value="" selected="selected">源</option>
											<option value="true">开</option>
											<option value="false">关</option>
										</select>
										<br>
										<input type="button" value="更改" onclick="updateServerConfig()" />
									</div>
								</div>
							</div>
							<div id="WebProjects">
								<div id="WebProjects-title">
									<h1><br>项<br>目<br>列<br>表</h1>
								</div>
								<div id="WebProjects-context"></div>
							</div>
							<script src="js/server/server.js" type="text/javascript" charset="utf-8"></script>
						</div>
						<div class="Project content">
							<div class="projectConfig">
								<div class="config">
									<div class="title">
										基<br>础<br>配<br>置
									</div>
									<div class="context">
										<span>项目名称</span>
										<input type="text" id="projectName" value="" />
										<br>
										<span>项目路径</span>
										<input type="text" id="projectRootPath" value="" />
										<br>
										<span>网络路径</span>
										<input type="text" id="projectUrl" value="" />
									</div>
								</div>
								<div class="config">
									<div class="title">
										资<br>源<br>配<br>置
									</div>
									<div class="context">
										<span>资源路径</span>
										<input type="text" id="resourceRootPath" value="" />
										<br>
										<span>首页路径</span>
										<input type="text" id="indexPath" value="" />
										<br>
										<span>传输限制</span>
										<input type="text" id="fileReadLimit" value="" />
									</div>
								</div>
								<div class="config">
									<div class="title">
										会<br>话<br>配<br>置
									</div>
									<div class="context">
										<span>会话标识</span>
										<input type="text" id="SESSION_ID" value="" />
										<br>
										<span>持续时间</span>
										<input type="text" id="maxLiveTime" value="" />
										<br>
										<span>检查时间</span>
										<input type="text" id="checkTime" value="" />
									</div>
								</div>
								<div class="config">
									<div class="title">
										代<br>理<br>配<br>置
									</div>
									<div class="context">
										<span>编码格式</span>
										<input type="text" id="proxyCharset" value="" />
										<br>
										<span>接收时间</span>
										<input type="text" id="proxyReceiveTimeOut" value="" />
										<br>
										<span>等待时间</span>
										<input type="text" id="continueTimeOut" value="" />
									</div>
								</div>
								<div id="updateProjectConfig" class="config update">
									<button type="button" onclick="">更改</button>
								</div>
							</div>
							<div class="projectPath">
								<div class="projectPath-context">
									<div class="title">库路径</div>
									<div class="context" id="libPathList"></div>
								</div>
								<div class="projectPath-context">
									<div class="title">类路径</div>
									<div class="context" id="classPathList"></div>
								</div>
							</div>
							<div class="code">
								<div class="context">
									<div id="codeHandle">
										<span>会话列表</span>
										<script src="js/project/session.js" type="text/javascript" charset="utf-8"></script>
										<input type="button" id="SessionListButton" value="配置" onclick="intoSessionList()"/>
										&nbsp;
										<span>全局应用</span>
										<script src="js/project/application.js" type="text/javascript" charset="utf-8"></script>
										<input type="button" id="ApplicationListButton" value="配置" onclick="intoApplicationList()"/>
										<br>
										<span>代理列表</span>
										<script src="js/project/proxy.js" type="text/javascript" charset="utf-8"></script>
										<input type="button" id="ProxyListButton" value="配置" onclick="intoProxyList()"/>
										&nbsp;
										<span>单页应用</span>
										<script src="js/project/servlet.js" type="text/javascript" charset="utf-8"></script>
										<input type="button" id="ServletListButton" value="配置" onclick="intoServletList()"/>
									</div>
								</div>
							</div>
							<script src="js/project/project.js" type="text/javascript" charset="utf-8"></script>
						</div>
						<div class="FileSystem content">
							<div id="nowPath"></div>
							<div id="fileList" ondragenter="ignoreDrag(event)" ondragover="ignoreDrag(event)"
								ondrop="drop(this.projectIndex,event)"></div>
							<div id="fileHandle"></div>
							<script src="js/file/file.js" type="text/javascript" charset="utf-8"></script>
						</div>
						<div class="Console content" id="ConsoleMain">
							<textarea id="ConsoleText" rows="" cols="" readonly="true"></textarea>
							<div class="bottom">
								<textarea id="AnalogHTTP" rows="" cols="" spellcheck="false"></textarea>
								<button type="button" id="AnalogButton" onclick="analogHttp()">模<br>拟<br>请<br>求</button>
							</div>
							<script src="js/console/console.js" type="text/javascript" charset="utf-8"></script>
						</div>
						<div class="Help content">
							
							<script src="js/help/help.js" type="text/javascript" charset="utf-8"></script>
						</div>
						<div id="ListDiv">
							<div id="ListTitle"></div>
							<div id="ListContent"></div>
							<button id="ListClose" type="button" onclick="closeListDiv()">关闭</button>
						</div>
						<div id="CodeDiv">
							<div id="CodeTitle"></div>
							<div id="CodeContent" rows="" cols="">
								<textarea class="form-control" id="Code" name="code"></textarea>
								<script src="codemirror/mode/clike.js" type="text/javascript" charset="utf-8"></script>
								<script src="codemirror/addon/fold/brace-fold.js" type="text/javascript" charset="utf-8"></script>
								<script src="codemirror/addon/fold/comment-fold.js" type="text/javascript" charset="utf-8"></script>
								<script src="codemirror/addon/fold/foldcode.js" type="text/javascript" charset="utf-8"></script>
								<script src="codemirror/addon/fold/foldgutter.js" type="text/javascript" charset="utf-8"></script>
								<script type="text/javascript">
									var editor = CodeMirror.fromTextArea(document.getElementById("Code"), {
										mode: "text/x-java", //实现Java代码高亮
										lineNumbers: true,	//显示行号
										theme: "eclipse",	//设置主题
										lineWrapping: true,	//代码折叠
										foldGutter: true,
										gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
										matchBrackets: true,	//括号匹配
										indentUnit: 4,
										indentWithTabs: true,
									});
									editor.setSize("100%", "100%");
								</script>
							</div>
							<button id="CodeClose" type="button" onclick="closeCodeDiv()">关闭</button>
							<button id="CodeChange" type="button">改变</button>
						</div>
					</div>
				</div>
			</div>
			<div id="foot">
				<h4>湘ICP备2022000937号</h4>
			</div>
		</div>
		<script type="text/javascript">
			function checkProjectCount(){
				if(nowProjectIndex < 0){
					rat.pushInfo("好像还没有项目，赶紧创建第一个项目吧！");
				}
			}
			intoHome();
			showServer();
			rat.pushInfo("欢迎使用杰瑞鼠服务器管理系统");
			setTimeout(checkProjectCount, 3000);
		</script>
	</body>
</html>
